const path = require('path')
module.exports = {
  // transpileDependencies: true,
  lintOnSave: true,

  pluginOptions: {
    'style-resources-loader': {
      preProcessor: 'less',
      patterns: [
        // less自动化导入
        path.join(__dirname, './src/assets/styles/mixin.less'),
        path.join(__dirname, './src/assets/styles/varables.less')
      ]
    },
    // base64
    chainWebpack: config => {
      // 图片加载
      config.module
        .rule('images')
        .use('url-loader')
        .loader('url-loader')
        .tap(options => Object.assign(options, { limit: 10000 }))
        // 这个是给webpack-dev-server开启可IP和域名访问权限。
        // 开启IP域名访问
      config.devServer.disableHostCheck(true)
    },
    configureWebpack: {
      externals: {
        qc: 'QC'
      }
    }
    // chainWebpack: config => {
    //   config.devServer.disableHostCheck(true)
    // }
  },
  devServer: {
    disableHostCheck: true
  }

}
